package form;

import java.util.Date;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;

public class Account {
	@NotEmpty
	@Size(min = 2, max = 30)
	private String name;
	@NotEmpty
	@Size(min = 2, max = 30)
	@Email
	private String email;
	@DateTimeFormat(pattern = "MM/dd/yyyy")
	@NotNull
	private Date birthday;

	public Account(String name, String email, Date birthday) {
		super();
		this.name = name;
		this.email = email;
		this.birthday = birthday;
	}

	public Account() {
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

}
